package com.google.code.twithis.core.processor.impl;

import java.util.Date;

import net.rim.blackberry.api.pdap.BlackBerryEvent;

import com.google.code.twithis.core.processor.Processor;

public class EventProcessor implements Processor {

	public String getMessage(Object context) {
		BlackBerryEvent event = (BlackBerryEvent) context;

		String summary = event.getString(BlackBerryEvent.SUMMARY, BlackBerryEvent.ATTR_NONE);
		Date start = new Date(event.getDate(BlackBerryEvent.START, BlackBerryEvent.ATTR_NONE));
		Date end = new Date(event.getDate(BlackBerryEvent.END, BlackBerryEvent.ATTR_NONE));

		return start.toString() + " to " + end.toString() + " > " + summary;
	}

}
